{include file="public/header" /}
<style>
    .layui-rate {
        padding: 6px 5px 10px 0 !important;
    }

    .layui-rate .layui-inline {
        margin-right: 5px !important;
    }
</style>
<body>
<div class="x-body layui-anim">
    <form action="{:url('save')}" class="layui-form" id="form">
        <input type="hidden" name="id" value="{$info.id}">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>评价内容</legend>
        </fieldset>
        <div class="layui-form-item">
            <label class="layui-form-label">评价会员</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" value="{$info.user.account}" readonly="">
            </div>
            <label class="layui-form-label">评价时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" value="{$info.create_time}" readonly="">
            </div>
            <label class="layui-form-label">回复状态</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" value="{$info.status == 1?'未回复':'已回复'}" disabled=""
                       style="color: red">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品评分</label>
            <div class="layui-input-inline">
                <div data-value="{$info.score}" class="star"></div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">店铺描述评分</label>
            <div class="layui-input-inline">
                <div data-value="{$info.orders.describe_score}" class="star"></div>
            </div>
            <label class="layui-form-label">店铺物流评分</label>
            <div class="layui-input-inline">
                <div data-value="{$info.orders.logistics_score}" class="star"></div>
            </div>
            <label class="layui-form-label">店铺服务评分</label>
            <div class="layui-input-inline">
                <div data-value="{$info.orders.service_score}" class="star"></div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">评价商品</label>
            <div class="layui-input-inline" style="width: 80%;">
                <table class="layui-table layui-form" style="margin: 0px;">
                    <thead>
                    <tr>
                        <th>商品名称</th>
                        <th>缩略图</th>
                        <th>单价</th>
                        <th>规格</th>
                        <th>数量</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr class="data_line">
                        <td>{$info.product.title}</td>
                        <td><a href="{$info.product.icon}" target="_blank"><img src="{$info.product.icon}"
                                                                                style="width: 30px"/></a></td>
                        <td>{$info.product.vip_price}</td>
                        <td>{$info.product.sku_name}</td>
                        <td>{$info.product.num}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">评价内容</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" value="{$info.content}" placeholder="评价内容" readonly="">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">评价图片</label>
            <div class="layui-input-block">
                <ul class="layui-upload-list showImages">
                    {foreach name="$info.images" id="v"}
                    <li class="flex-li">
                        <a href="{$v}" target="_blank"><img class="flex-img" src="{$v}"></a>
                    </li>
                    {/foreach}
                </ul>
            </div>
        </div>
        <fieldset class="layui-elem-field layui-field-title">
            <legend>回复内容</legend>
        </fieldset>
        <div class="layui-form-item">
            <label class="layui-form-label">回复内容</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="reply_content" value="{$info.reply_content}"
                       placeholder="请填写回复内容">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">回复时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" value="{$info.reply_time}" disabled="">
            </div>
            <label class="layui-form-label">回复人</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" value="{$info.reply_admin_name}" disabled="">
            </div>
        </div>
        <div class="layui-form-item layui-layout-admin">
            <div class="layui-input-block">
                <div class="layui-footer" style="left: 0;">
                    <button class="layui-btn" lay-filter="save" lay-submit formObj="#form">保存</button>
                </div>
            </div>
        </div>

    </form>
</div>
</body>
{include file="public/footer" /}
<script>
    layui.use('rate', function () {
        var rate = layui.rate;
        $('.star').each(function () {
            rate.render({
                elem: this  //绑定元素
                , value: $(this).attr('data-value')
                , readonly: true
            });
        });
    });
</script>
</html>